package com.chuangjiangx.member.score.ddd.domain.model;

/**
 * 积分兑换规则对象
 */
public enum MbrScoreGiftRuleScope {

    ALL("所有会员",(byte) 0);

    public final String name;
    public final Byte value;

    MbrScoreGiftRuleScope(String name, Byte value) {
        this.name = name;
        this.value = value;
    }

    public static MbrScoreGiftRuleScope getScoreGiftScope(byte value) {
        for (MbrScoreGiftRuleScope mbrScoreGiftRuleScope : MbrScoreGiftRuleScope.values()) {
            if (mbrScoreGiftRuleScope.value == value) {
                return mbrScoreGiftRuleScope;
            }
        }
        return null;
    }
}
